Next | Prev | Up | Top | Contents | Index

SCSI Error Message Tables

The scsi module contains a set of error message tables that you can use to generate error messages based on SCSI sense codes and other data. The contents of these tables is documented here for reference, and to assist in decoding messages from SCSI drivers.

Each table is an array of pointers to strings; for example the scsi_key_msgtab table is defined beginning as follows:

char *scsi_key_msgtab[SC_NUMSENSE] = {
   "No sense",          /* 0x0 */
   "Recovered Error",   /* 0x1 */
...};
Each of the tables is declared as extern in sys/scsi.h.


Adapter Error Codes (Table scsi_adaperrs_tab)

The table with the external name scsi_adaperrs_tab contains message strings to document the adapter error codes that can be returned in the scsirequest.sr_status field (see Table 15-6). The scsi_adaperrs_tab table contains NUM_ADAP_ERRS entries (9, defined in sys/scsi.h). The first entry (index 0x0) contains a pointer to a null string. The other entries are documented in Table 15-9.

Adapter Error Codes
Adapter Error CodeConstant NameMessage Text
0x1SC_TIMEOUTDevice does not respond to selection .
0x2SC_HARDERRController protocol error or SCSI bus reset.
0x3SC_PARITYSCSI bus parity error.
0x4SC_MEMERRParity/ECC error in system memory during DMA.
0x5SC_CMDTIMECommand timed out.
0x6SC_ALIGNBuffer not correctly aligned in memory.
0x7SC_ATTNUnit attention received on another command causes retry.
0x8SC_REQUESTDriver protocol error.


SCSI Sense Codes (Table scsi_key_msgtab)

The table with the external name scsi_key_msgtab is indexed by the primary sense code. Its contents are listed in Table 15-10. The table contains SC_NUMADDSENSE entries (16, defined in sys/scsi.h), of which the last two should not occur.

Primary Sense Key Error Table
Sense Key Message Most Common Cause
0x0 No sense No error information available.
0x1 Recovered error The device recovered by itself.
0x2 Device not ready No media, or drive not spun up.
0x3 Media error An actual media problem.
0x4 Device hardware errorUsually a device hardware error.
0x5 Illegal request Invalid command or data issued.
0x6 Unit attention Device was reset or power-cycled.
0x7 Data protect error Usually device is write-protected.
0x8 Unexpected blank mediaTried to read at end of a tape.
0x9 Vendor unique error Varies.
0xA Copy aborted Copy command aborted by host (not used).
0xB Aborted command Target device aborted command.
0xC Search data successful Search data command OK (not used).
0xD Volume overflow Tried to write past EOT on tape.
0xE Reserved (0xE) 0xE should not be seen.
0xF Reserved (0xF)0xF should not be seen.


Additional Sense Codes (Table scsi_addit_msgtab)

The table with the external name scsi_addit_msgtab is indexed by the Additional Sense Code (ASC) value, when one is present. The table contains SC_NUMADDSENSE entries (0x71, defined in sys/scsi.h). Some values have no standard definition; for these, the table contains a NULL value. Therefore you should always test the table value for a valid pointer before using it to format a message.

Table 15-11 lists the contents of this message table. Undefined (NULL) table entries are omitted.

Additional Sense Code Table
ASC ValueCorresponding Message String
0x01No index/sector signal
0x02No seek complete
0x03Write fault
0x04Not ready to perform command
0x05Unit does not respond to selection
0x06No reference position
0x07Multiple drives selected
0x08LUN communication error
0x09Track error
0x0aError log overflow
0x0cWrite error
0x10ID CRC or ECC error
0x11Unrecovered data block read error
0x12No address mark found in ID field
0x13No address mark found in Data field
0x14No record found
0x15Seek position error
0x16Data sync mark error
0x17Read data recovered with retries
0x18Read data recovered with ECC
0x19Defect list error
0x1aParameter overrun
0x1bSynchronous transfer error
0x1cDefect list not found
0x1dCompare error
0x1eRecovered ID with ECC
0x20Invalid command code
0x21Illegal logical block address
0x22Illegal function
0x24Illegal field in CDB
0x25Invalid LUN
0x26Invalid field in parameter list
0x27Media write protected
0x28Media change
0x29Device reset
0x2aLog parameters changed
0x2bCopy requires disconnect
0x2cCommand sequence error
0x2dUpdate in place error
0x2fTagged commands cleared
0x30Incompatible media
0x31Media format corrupted
0x32No defect spare location available
0x33[2]Media length error
0x36Toner/ink error
0x37Parameter rounded
0x39Saved parameters not supported
0x3aMedium not present
0x3bForms error
0x3dInvalid ID msg
0x3eSelf config in progress
0x3fDevice config has changed
0x40RAM failure
0x41Data path diagnostic failure
0x42Power on diagnostic failure
0x43Message reject error
0x44Internal controller error
0x45Select/reselect failed
0x46Soft reset failure
0x47SCSI interface parity error
0x48Initiator detected error
0x49Inappropriate/illegal message
0x4aCommand phase error
0x4bData phase error
0x4cFailed self configuration
0x4eOverlapped commands attempted
0x53Media load/unload failure
0x57Unable to read table of contents
0x58Generation (optical device) bad
0x59Updated block read (optical device)
0x5aOperator request or state change
0x5bLogging exception
0x5cRPL status change
0x5dSelf diagnostics predict unit will fail soon
0x60Lamp failure
0x61Video acquisition error/focus problem
0x62Scan head positioning error
0x63End of user area on track
0x64Illegal mode for this track
0x70[3]Decompression error


[2] Specified as tape only.
[3] DAT only; may be in SCSI3.
Next | Prev | Up | Top | Contents | Index